﻿using System;
using System.Collections.Generic;

using Perseus;

namespace Hetymine.Executioner.Data {
    public class FlagInfo {
        private FlagInfo() { }
        public FlagInfo(string flag) : this(flag, new List<string>()) { }
        public FlagInfo(string flag, IList<string> parameters) {
            this.Flag = flag;
            this.Parameters = new List<string>(parameters);
        }

        public string Flag { get; set; }
        public List<string> Parameters { get; set; }

        public override string ToString() {
            string flag = this.Flag;

            if (this.Parameters.Count > 0) {
                flag += "[";                
                flag += this.Parameters.ToArray().Join(",");
                flag += "]";
            }

            return flag;
        }
    }
}
